<?php

	$shangjia = $_REQUEST['shangjia'];
	
	$image = $_REQUEST['src'];
	$name = $_REQUEST['name'];
	$guige = $_REQUEST['guige'];
	$danjia = $_REQUEST['danjia'];
	$num = $_REQUEST['num'];
	$id = $_REQUEST['id'];
	$daizhifu =$_REQUEST['daizhifu'];
	$yizhifu =$_REQUEST['yizhifu'];
	$daifahuo =$_REQUEST['daifahuo'];
	$yifahuo =$_REQUEST['yifahuo'];
	$paytime =$_REQUEST['patime'];
	$con = mysqli_connect('localhost','root','','libaiwu');
	mysqli_set_charset($con,'utf8');
	if($shangjia=='世纪联华'){
		$sql = "insert into lianhua (shangjia,image,name,guige,danjia,num) values('{$shangjia}','{$image}','{$name}','{$guige}','{$danjia}','{$num}')";
	}else if($shangjia=='丹尼斯'){
		$sql = "insert into dannisi (shangjia,image,name,guige,danjia,num) values('{$shangjia}','{$image}','{$name}','{$guige}','{$danjia}','{$num}')";
	}else if($shangjia=='del世纪联华'){
		$sql = "delete lianhua where id = '$id'";
	}else if($shangjia=='del丹尼斯'){
		$sql = "delete dannisi where id = '$id'";
	}
	
	$result = mysqli_query($con,$sql);
	echo 'success';
	mysqli_close($con);
?>